import PageBase from "../Base/PageBase";
//电子邮件puhalskijsemen@gmail.com
//源码网站 开vpn全局模式打开 http://web3incubators.com/
//电报https://t.me/gamecode999
//网页客服 http://web3incubators.com/kefu.html
const {ccclass, property} = cc._decorator;

@ccclass
export default class CardIntroductionPage extends PageBase {

    @property({type:cc.SpriteFrame,tooltip:"卡牌介绍图片"})
    cardIntroductionSpr:cc.SpriteFrame[] = [];

    @property({type:cc.Sprite,tooltip:"介绍图片"})
    introductionSp:cc.Sprite = null;

    closeFun:()=>void = null;

    /**绑定类型 */
    bindType(type:string,closeFun:()=>void){
        this.introductionSp.spriteFrame = this.cardIntroductionSpr[Number(type)];
        this.closeFun = closeFun;
    }

    OnCloseBtn(): void {
        this.closeFun && this.closeFun();
        super.OnCloseBtn();
    }
    
}
